package com.leyou.common.enums;

import lombok.Getter;

/**
 * @version V1.0
 * @author: Ljxpa
 * @date: 2020/03/02 21:06
 * @description:
 */
@Getter
public enum ItemExceptionEnum {
	//这里看似成员变量本质是该枚举类的对象
	PRICE_CANNOT_BE_NULL(400,"价格不能为空"),
	CATEGORY_NOT_FOUND(204,"查无此分类"),
	BRAND_NOT_FOUND(204,"查无此品牌"), DATA_SAVE_ERROR(500,"数据保存失败" ),
	DATA_UPDATE_ERROR (500,"数据更新失败"),
	UPDATE_OPERATION_FAIL(500,"获取签名失败" ),
	DATA_TRANSFER_ERROR(500,"数据转换失败" ),
	DELETE_DATA_ERROR(500,"数据删除失败" ),
	DATA_QUERY_ERROR(500,"数据库查询异常" ),
	SPECGROUP_NOT_FOUND(204,"查无此参数组" ),
	SPEC_PARAM_NOT_FOUND(204,"查无此参数" ),
	DATA_DELETE_ERROR(500,"数据删除失败" ),
	DATA_NOT_ALLOW_DELETE(401,"数据不允许删除" ),
	DB_SERVICE_ERROR(500,"数据库异常" ),
	DATA_NOT_FOUND(204,"数据未查到" ),
	QUERY_PARAM_ERROR(400,"请求参数错误" ), SERVER_OPERATION_ERROR(500,"服务器异常" );





	private int status;
	private String message;
	//有参构造，枚举会调用本构造方法初始化枚举类对象
	ItemExceptionEnum(int status,String message){

		this.status=status;
		this.message = message;
	}

}
